package com.rocket.mq.impl;


import com.rocket.entity.Notice;
import com.rocket.mq.NoticeTopicProducer;
import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author huan
 * @Date 2025/6/30
 */
@Service
public class NoticeTopicProducerImpl implements NoticeTopicProducer {

    @Autowired
    private RocketMQTemplate rocketMQTemplate;

    @Override
    public void sendNoticeMessage(String topic, Notice message) {
        rocketMQTemplate.convertAndSend(topic, message);
    }
}
